import { createSlice } from '@reduxjs/toolkit'

const DefaultSlice = createSlice({
    name: 'DefaultSlice',
    initialState: {
        change: '测试',
        defaultState: 0,
        defauprice:0,
        yesandno:true
    },
    reducers: {
        change: (state, action) => {
            return state.change
        },
        changeDefaultState: (state, action) => {
            state.defaultState = action.payload
            return state
        },
        changeDefauprice: (state, action) => {
            state.defauprice=action.payload
            return state
        },
        changeYesandno: (state, action) => {
            state.yesandno=action.payload
            return state
        },
    }
})
export const { change, changeDefaultState,changeDefauprice,changeYesandno } = DefaultSlice.actions
export default DefaultSlice
